home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / PlainTalk™ Speech Technologies / Text To Speech / Programming Stuff / Interfaces / SpeechGala.h < prev    next >
Encoding:
Text File  |  1993-09-15  |  4.1 KB  |  114 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992-1993 Apple Computer.  All rights reserved. 
  2. // :Inc:SpeechGala.h -- 1993 March 1 
  3.  
  4. #ifndef    __SpeechGala__        
  5. #define    __SpeechGala__
  6.  
  7. #ifndef _Speech_
  8. #include "Speech.h"
  9. #endif
  10.  
  11.  
  12.     // Gala Tea extended selectors and arguments for GetSpeechInfo
  13.     // and SetSpeechInfo.
  14.     
  15. enum {                                // Gala Tea extended selectors.
  16.     soGalaSynthID            = 'gala',    // For the Gala Tea synthesizer.
  17.     soGalaFraction            = 'frac',    // Method of speaking fractions.
  18.     soGalaAllophoneSymbols    = 'alsy',    // Get allophone symbols.
  19.     soGalaConvertToAllo        = 'cval',    // Convert to allophones.
  20.     soGalaConvertToWave        = 'cvwv',    // Convert to waveforms.
  21.     soGalaAllophoneCallBack    = 'alcb',    // Call routine for each allophone.
  22.     soGalaSentenceCallBack    = 'secb',    // Call routine for each sentence.
  23.     soGalaLowPassFilter        = 'lopf',    // Low pass filter usage.
  24.     soGalaSampleSize        = 'ssiz',    // Size of output sound samples.
  25.     soGalaProsody            = 'pros',    // Prosody switch.
  26.     soGalaVoiceBasePitch    = 'vbas',    // Central pitch for voice.
  27.     soGalaVoiceModulation    = 'vmod'    // Pitch modulation range for voice.
  28. };
  29.  
  30. enum {                                // Input mode extension.
  31.     soGalaInputAllo            = 'ALLO'    // Allophone input.
  32. };
  33.  
  34. enum {                                // Number mode extensions.
  35.     soGalaNumbersPairs        = 'PAIR',    // Speak digits in groups of two.
  36.     soGalaNumbersThrees        = 'THRE'    // Speak digits in groups of three.
  37. };
  38.  
  39. enum {                                // Speak fractions extension.
  40.     soGalaFractionsOn        = 'ON',        // Pronounce as fractions.
  41.     soGalaFractionsOff        = 'OFF'        // Say number slash number.
  42. };
  43.  
  44. enum {                                // Low pass filter extension.
  45.     soGalaLowPassFilterDefault = 'NORM',// Default for this machine.
  46.     soGalaLowPassFilterBest    = 'BEST',    // Highest quality.
  47.     soGalaLowPassFilterNone    = 'NONE',    // No filtering.
  48.     soGalaLowPassFilterSW08    = 'SW08'    // Eighth-order software filter.
  49. };
  50.  
  51. enum {                                // Prosody switch extension.
  52.     soGalaProsodyDefault    = 'NORM',    // Default for this machine.
  53.     soGalaProsodyBest        = 'BEST',    // Highest quality.
  54.     soGalaProsodyOn            = 'ON',        // Speak in monotone.
  55.     soGalaProsodyOff        = 'OFF'        // Speak naturally.
  56. };
  57.  
  58. enum {                                // Sound sample size extension.
  59.     soGalaSamplesDefault    = 'NORM',    // Default for this machine.
  60.     soGalaSamplesBest        = 'BEST',    // Highest quality.
  61.     soGalaSamples8Bit        = 'SS08',    // 8-bit samples.
  62.     soGalaSamples16Bit        = 'SS16'    // 16-bit samples.
  63. };
  64.  
  65.  
  66.     // This is the Component sub-type for the Gala Tea speech synthesizer.
  67.     
  68. enum {
  69.     kGTVerCompType            = kTextToSpeechSynthType,
  70.     kGTVerSubType            = 0,
  71.     kGTVerManuf                = soGalaSynthID
  72. };
  73.  
  74.  
  75.     // Types used as arguments to GetSpeechInfo and SetSpeechInfo.
  76.     
  77. typedef struct    GTXtndData {        // Extended info for several selectors.
  78.     OSType        synthID;                // soGalaSynthID ('gala').
  79.     OSType        selector;                // Extended selector (e.g. 'frac').
  80.     long        info2;                    // Extended information or pointer to it.
  81. } GTXtndData;
  82.  
  83. typedef struct    GTXtndConvertData {    // Extended info for conversion selectors.
  84.         // input values
  85.     OSType        synthID;                // soGalaSynthID ('gala').
  86.     OSType        selector;                // Extended selector ('cval' or 'cvwv').
  87.     Ptr            inputBuffer;            // Address of the data to convert.
  88.     long        inputLen;                // Length of the data to convert.
  89.     long        controlFlags;            // 0 (for last buffer) or kNoEndingProsody.
  90.     Handle        outputBuffer;            // Handle to buffer for the output.
  91.         // return values
  92.     long        outputLen;                // Returns the size of the output.
  93.     Boolean        moreOutput;                // Returns true if outputBuffer is too small
  94.                                         //     for all the output at at once.
  95. } GTXtndConvertData;
  96.  
  97. typedef pascal void (*GTAlcbCallBackPtr)( // Allophone callback routine.
  98.     SpeechChannel    chan,                // Channel being spoken on.
  99.     unsigned long    refCon,                // Application value set via 'refc'.
  100.     unsigned short    curAllo,            // Current allophone code.
  101.     short            alloDur,             // Duration of the current allophone in milliseconds.
  102.     short            remDur,                // Remaining duration of the current allophone.
  103.     unsigned short    nextAllo            // Next allophone code.
  104. );
  105.  
  106. typedef pascal void (*GTSecbCallBackPtr)( // Sentence callback routine.
  107.     SpeechChannel    chan,                // Channel being spoken on.
  108.     unsigned long    refCon,                // Application value set via 'refc'.
  109.     unsigned long    sentPos,            // Byte count to the start of the sentence.
  110.     unsigned short    sentLen                // Byte length of this sentence.
  111. );
  112.  
  113. #endif    // __SpeechGala__
  114.